import { get, post } from './http.js'

const base = config.ip
const projectName = '/rcdg-logictics'

// -----------------物品领用--------------
// 获取办公用品申报列表
export const getlistLogicticsApplys = p => get(`${base}${projectName}/logictics-info/listLogicticsApplys`, p)
// 获取新增表单的详情信息
export const getAddDetailInfo = p => get(`${base}${projectName}/logictics-info/getAddDetailInfo`, p)
// 新增申领单
export const addLogicticsInfo = p => post(`${base}${projectName}/logictics-info/addLogicticsInfo`, p)
// 删除申领单
export const delLogicticsInfo = p => post(`${base}${projectName}/logictics-info/delLogicticsInfo`, p)
// 获取申领单详情
export const getLogicticsInfoDetail = p => get(`${base}${projectName}/logictics-info/getLogicticsInfoDetail`, p)
// 获取审批记录列表:页面右侧流程图
export const getFlowApproveList = p => get(`${base}${projectName}/logictics-info/getFlowApproveList`, p)
// 判断是否有新增权限
export const checkAddAuthority = p => get(`${base}${projectName}/logictics-info/checkAddAuthority`, p)
// 获取审批列表
export const getlistLogicticsConfirm = p => get(`${base}${projectName}/logictics-info/listLogicticsConfirm`, p)
// 编辑申领单
export const updateLogicticsInfo = p => post(`${base}${projectName}/logictics-info/updateLogicticsInfo`, p)
// 审批表单:通过/不通过
export const approveForm = p => post(`${base}${projectName}/logictics-info/approveForm`, p)
// 批量确定(批量审批通过)
export const approveBatch = p => post(`${base}${projectName}/logictics-info/approveBatch`, p)
// 获取窗口列表
export const getWindowList = p => get(`${base}${projectName}/logictics-info/getWindowList`, p)
// 获取统计数据
export const getStatisticsList = p => get(`${base}${projectName}/logictics-info/getStatisticsList`, p)
// 校验是否有可审批的表单[批量确定]
export const checkBatchConfirmAuthority = p =>
  post(`${base}${projectName}/logictics-info/checkBatchConfirmAuthority`, p)

// --------------报修维修--------------
// 【获取报修表单申报列表】
export const getlistRepairApplys = p => get(`${base}${projectName}/sa-repair/listRepairApplys`, p)

// 【获取报修审核列表】
export const getlistRepairConfirm = p => get(`${base}${projectName}/sa-repair/listRepairConfirm`, p)

// 【获取报修单详情】
export const getRepairDetail = p => get(`${base}${projectName}/sa-repair/getRepairDetail`, p)

// 【获取审批记录列表:页面右侧流程图】
export const getFlowApproveListRepair = p => get(`${base}${projectName}/sa-repair/getFlowApproveList`, p)

// 【新增报修单】
export const addRepair = p => post(`${base}${projectName}/sa-repair/addRepair`, p)

// 【审批表单:通过/不通过】
export const submitapproveForm = p => post(`${base}${projectName}/sa-repair/approveForm`, p)

// ----------------出差报销-------------------

// 【获取所有人员列表】
export const getAllUserList = p => get(`${base}${projectName}/sa-trip-reimburse/getAllUserList`, p)

// 【获取审批单申报列表】
export const getlistTripReimburseApplys = p => get(`${base}${projectName}/sa-trip-reimburse/listTripReimburseApplys`, p)

// 【获取审批单审核列表】
export const getlistTripReimburseConfirm = p =>
  get(`${base}${projectName}/sa-trip-reimburse/listTripReimburseConfirm`, p)

// 【获取审批单详情】
export const getTripReimburseDetail = p => get(`${base}${projectName}/sa-trip-reimburse/getTripReimburseDetail`, p)

// 【获取审批记录列表:页面右侧流程图】
export const getFlowApproveListExpense = p => get(`${base}${projectName}/sa-trip-reimburse/getFlowApproveList`, p)

// 【新增审批单】
export const addTripReimburse = p => post(`${base}${projectName}/sa-trip-reimburse/addTripReimburse`, p)

// 【编辑审批单】
export const updateTripReimburse = p => post(`${base}${projectName}/sa-trip-reimburse/updateTripReimburse`, p)

// 【审批表单:通过/不通过】
export const approveFormExpense = p => post(`${base}${projectName}/sa-trip-reimburse/approveForm`, p)

// 【填写用车信息】
export const addVehicleInfo = p => post(`${base}${projectName}/sa-trip-reimburse/addVehicleInfo`, p)

// 【获取机构列表】
export const getOrgListBank = p => get(`${base}${projectName}/sa-card-manage/getOrgList`, p)

// 【根据机构id查询人员列表】
export const getUserListByOrgId = p => get(`${base}${projectName}/sa-weekend-duty/getUserListByOrgId`, p)

// 【查询审批通过的出差前审批单列表】
export const getlistPassTripReimburse = p => get(`${base}${projectName}/sa-trip-reimburse/listPassTripReimburse`, p)

// 【校验出差审批单是否可以被关联】
export const checkIsCanRelated = p => get(`${base}${projectName}/sa-trip-reimburse/checkIsCanRelated`, p)

// 【获取机构负责人】
export const getOrgLeader = p => get(`${base}${projectName}/sa-trip-reimburse/getOrgLeader`, p)
